home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Reference / DevCon / Milan_1991 / Devcon91.4 / AppShell / Examples / Clipboard / ilbmrec.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-01  |  2.1 KB  |  54 lines

  1. #include <exec/types.h>
  2. #include <intuition/intuition.h>
  3. #include <intuition/intuitionbase.h>
  4. #include <graphics/gfx.h>
  5. #include <graphics/displayinfo.h>
  6. #include <graphics/sprite.h>
  7. #include <iff/ilbm.h>
  8.  
  9. #define    MAXCOLORS    32
  10.  
  11. /* Work structure */
  12. typedef struct ILBMRec
  13. {
  14.     ULONG ir_ModeID;        /* Display mode id */
  15.     UWORD ir_Width;        /* Width of image */
  16.     UWORD ir_Height;        /* Height of image */
  17.     UWORD ir_Depth;        /* Depth of image */
  18.     struct BitMap ir_BMap;    /* Bitmap */
  19.     struct RastPort ir_RPort;    /* RastPort */
  20.     struct Point2D ir_Grab;    /* Grab coordinates */
  21.     WORD ir_CRegs[MAXCOLORS];    /* Color table used by LoadRGB4() */
  22.     WORD ir_NumColors;        /* Number of colors in color table */
  23. } ILBM;
  24.  
  25. #define    BPR(w)        ((w) + 15 >> 4 << 1)    /* Bytes per row */
  26.  
  27. /* ilbm.c */
  28. ILBM *ReadILBM (BPTR drawer, STRPTR name, struct TagItem * attrs);
  29. VOID FreeILBM (ILBM * ilbm);
  30. ILBM *GetILBM (struct IFFHandle * iff);
  31. BOOL GetBMHD (struct IFFHandle * iff, struct BitMapHeader * bmhd);
  32. BOOL PutBMHD (struct IFFHandle * iff, struct BitMapHeader * bmhd, struct BitMap * bm);
  33. WORD GetColors (struct IFFHandle * iff, struct ColorRegister * cmap);
  34. BOOL PutColors (struct IFFHandle * iff, struct BitMapHeader * bmhd, struct ColorRegister * cmap);
  35. void GetHotSpot (struct IFFHandle * iff, struct Point2D * grab, WORD, WORD);
  36. BOOL PutHotSpot (struct IFFHandle * iff, struct Point2D * grab);
  37. BOOL GetBody (struct IFFHandle * iff, struct BitMapHeader * bmhd, struct BitMap * bm);
  38. BOOL GetLine (struct IFFHandle * iff, UBYTE * buf, WORD wide, WORD deep, UBYTE cmptype);
  39. BOOL PutBody (struct IFFHandle * iff, struct BitMapHeader * bmhd, struct BitMap * bitmap);
  40. BOOL AllocBMRasters (struct BitMap * bm, BYTE depth, WORD width, WORD height);
  41.  
  42. /* Pointer preference record */
  43. struct PointerPref
  44. {
  45.     struct Prefs pp_Header;    /* Preference header */
  46.     UWORD *pp_PData;        /* Pointer data */
  47.     WORD pp_Height;        /* Height of pointer */
  48.     WORD pp_Width;        /* Width of pointer */
  49.     WORD pp_XOffset;        /* X offset of hotspot */
  50.     WORD pp_YOffset;        /* Y offset of hotspot */
  51.     WORD pp_CRegs[3];        /* Color spec */
  52.     LONG pp_DSize;        /* Size of data */
  53. };
  54.